module.exports = app => {
   const mongoose = require('mongoose')
   mongoose.set('useCreateIndex', true) //解决问题代码
    //  数据库连接  并创建node-vue-m的数据
   mongoose.connect('mongodb://127.0.0.1:27017/node-vue-m', {
    useNewUrlParser: true,
    useUnifiedTopology:true
   })

   require('require-all')(__dirname + '/../models')
}